﻿<?php
session_start();
require_once('config.php');
function check($str){
    return str_replace("'","''",$str);
}
if($_SESSION["islogin"]!=='igiveyouthepower'){
echo "<script language=JavaScript>\r\n";
echo "alert('请先登录!');\r\n";
echo "location.href='/manage_login.html'\r\n";
echo "</script>";
}else{
$conn = mysql_connect($cfg_dbhost,$cfg_dbuser,$cfg_dbpwd);
mysql_select_db($cfg_dbname,$conn);
$sitename=check($_POST["sitename"]);
$Title=check($_POST["Title"]);
$Keywords=check($_POST["Keywords"]);
$Des=check($_POST["Des"]);
$About_Title=check($_POST["About_Title"]);
$About_Keywords=check($_POST["About_Keywords"]);
$About_Des=check($_POST["About_Des"]);
$Services_Title=check($_POST["Services_Title"]);
$Services_Keywords=check($_POST["Services_Keywords"]);
$Services_Des=check($_POST["Services_Des"]);
$Pricing_Title=check($_POST["Pricing_Title"]);
$Pricing_Keywords=check($_POST["Pricing_Keywords"]);
$Pricing_Des=check($_POST["Pricing_Des"]);
$faqs=check($_POST["faqs"]);
$contact=check($_POST["Contact"]);
$fontlink=check($_POST["fontlink"]);
$sql = "update ph_tdk set sitename='".$sitename."',Title='".$Title."',Keywords='".$Keywords."',Des='".$Des."',About_Title='".$About_Title."',About_Keywords='".$About_Keywords."',About_Des='".$About_Des."',Services_Title='".$Services_Title."',Services_Keywords='".$Services_Keywords."',Pricing_Title='".$Pricing_Title."',Pricing_Keywords='".$Pricing_Keywords."',Pricing_Des='".$Pricing_Des."',faqs='".$faqs."',contact='".$contact."',fontlink='".$fontlink."' where id=1";
mysql_query($sql,$conn);
// echo $sql;
// exit;
echo "<script language=JavaScript>\r\n";
echo "alert('修改成功!');\r\n";
echo "location.href='tdk.php'\r\n";
echo "</script>";
}
?>